
{extend name="mainadmin@layouts/base" /}
{block name="main" }
<header >
    <div class="page-breadcrumbs">


        <a class="pull-right pointer p-r" data-toggle="back" title="返回"><i class="fa fa-reply"></i></a>
    </div>
</header>

<section class="scrollable  wrapper">
    <form class="form-horizontal form-validate" method="post" action="{:url('info')}" style="padding:0;">

        <section class="panel panel-default">

            <div class="panel-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">是否开启幸运抽奖：</label>

                    <div class="col-sm-10">
                        <label><input name="isopen" type="radio" value="1" {$row['isopen']=='1'?'checked':''}/>开启</label>
                        <label><input name="isopen" type="radio" value="0" {$row['isopen']=='0'?'checked':''} />关闭</label>

                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">是否开启每月固定日子抽奖：</label>

                    <div class="col-sm-10">
                        <label><input name="isopenday" type="radio" value="1" id="show" {$row['isopenday']=='1'?'checked':''} />开启</label>
                        <label><input name="isopenday" type="radio" value="0" id="hide" {$row['isopenday']=='0'?'checked':''} />关闭</label>

                    </div>
                </div>

                <div class="form-group" id="meiyuedays">
                    <label class="col-sm-2 control-label">每月几号抽奖：</label>
                    <div class="col-sm-2 " >
                        <input type="text" class="input-max"  data-rule-number="true" name="days" value="{$row.days}" > <span style="color: #ff0000">* 如果开启每月固定日子抽奖则生效</span>
                    </div>

                </div>



                <div class="form-group">
                    <label class="col-sm-2 control-label" style="font-size: 15px">获得抽奖条件：</label>

                </div>
                <div class="form-group">

                    <div class="form-group">
                        <label class="col-sm-2 control-label"> </label>
                        <div class="col-sm-3 must" style="width: 40%">
                            <!--<select name="tjrole_id" style="width:80px;" data-toggle="select2" data-notsearch="true" data-placeholder="选择身份">
                                <option value="0" {$row['tjrole_id']=='0'?'selected':''}>粉丝</option>
                                <option value="3" {$row['tjrole_id']=='3'?'selected':''}>会员</option>
                                <option value="1" {$row['tjrole_id']=='1'?'selected':''}>代理</option>
                                <option value="2" {$row['tjrole_id']=='2'?'selected':''}>经理</option>
                            </select>-->
                             推荐 <input type="text" class="input-max" data-rule-required="true" name="tjnum" value="{$row.tjnum}" style="width: 60px;height: 26px;"> 个
                            <select name="btjrole_id" style="width:80px;" data-toggle="select2" data-notsearch="true" data-placeholder="选择身份">
                                <option value="0" {$row['btjrole_id']=='0'?'selected':''}>粉丝</option>
                                <option value="3" {$row['btjrole_id']=='3'?'selected':''}>会员</option>
                                <option value="1" {$row['btjrole_id']=='1'?'selected':''}>代理</option>
                                <option value="2" {$row['btjrole_id']=='2'?'selected':''}>经理</option>
                            </select>
                            获得 <input type="text" class="input-max" data-rule-required="true" name="times" value="{$row.times}" readonly="readonly" style="width: 60px;height: 26px;"> 次抽奖机会

                        </div>
                    </div>

                </div>


                <div class="control-group">
                    <div class="controls col-sm-offset-2">
                        <button type="submit" class="btn btn-primary" data-loading-text="保存中...">保存</button>
                        <input class="btn" name="button" id="button" data-toggle="back" value="取消" type="button">
                    </div>
                </div>

            </div>
        </section>

        <input type="hidden" name="id" value="{$row.id}" >
    </form>

</section>


<style>
    #meiyuedays{display: none;}
</style>
<script type="text/javascript">
    window.onload = function(){
        if(document.getElementById("show").checked){
            document.getElementById("meiyuedays").style.display = "block";
        }else{
            document.getElementById("meiyuedays").style.display = "none";
        }
        document.getElementById("show").onclick = function(){
            document.getElementById("meiyuedays").style.display = "block";
        }
        document.getElementById("hide").onclick = function(){
            document.getElementById("meiyuedays").style.display = "none";
        }
    }
</script>

{/block}
{block name="footer" }
<script type="text/javascript">

    seajs.use("dist/plupload/init.js")

</script>
{/block}
